package com.yuqiaotech.zcj.dao;

import java.io.Serializable;
import java.util.List;

public interface GenericDao<T, PK extends Serializable> {

	T save(T entity);
	T get(PK id);
	void delete(T entity);
	List findByHql(String hql, Object... params);
	public Object findUniqueBy(Class persistentClass,String propertyName, Object value);
	/**
	 * 执行更新操作的hql。
	 * @param hql
	 * @param params
	 * @return
	 */
	public int executeUpdate(String hql, Object ... params);
	
	public void update(T entity);
}
